#define _CRT_SECURE_NO_WARNINGS 1
#include"SeqList.h"

void test1()
{
	SeqList sl;
	SLInit(&sl);
	SLPushFront(&sl, 1);
	SLPushFront(&sl, 2);
	SLPushFront(&sl, 3);
	SLPushFront(&sl, 4);
	SLPushFront(&sl, 5);
	SLDestroy(&sl);
}


void test2()
{
	SeqList sl;
	SLInit(&sl);
	SLPushBack(&sl, 1);
	SLPushBack(&sl, 2);
	SLPushBack(&sl, 3);
	SLPushBack(&sl, 4);
	SLPushBack(&sl, 5);
	SLPushBack(&sl, 6);
	SLPushBack(&sl, 7);
	SLPushBack(&sl, 8);
	SLPushBack(&sl, 9);
	//SLPrint(&sl);
	//SLPopBack(&sl);
	//SLPopBack(&sl);
	//SLPopBack(&sl);
	//SLPopBack(&sl);
	//SLPopBack(&sl);
	//SLPrint(&sl);
	//SLPopBack(&sl);
	//SLPopBack(&sl);
	//SLPopBack(&sl);
	//SLPopBack(&sl);
	//SLPrint(&sl);
	SLDestroy(&sl);

}


void test3()
{
	SeqList sl;
	SLInit(&sl);
	SLPushBack(&sl, 1);
	SLPushBack(&sl, 2);
	SLPushBack(&sl, 3);
	SLPushBack(&sl, 4);
	SLPushBack(&sl, 5);
	SLPushBack(&sl, 6);
	SLPushBack(&sl, 7);
	SLPushBack(&sl, 8);
	SLPushBack(&sl, 9);
	int pos = SLFind(&sl, 3);
	if (pos != -1)
	{
		SLInsert(&sl, pos, 3);
	}
	pos = SLFind(&sl, 3);
	if (pos != -1)
	{
		SLInsert(&sl, pos, 3);
	}
	pos = SLFind(&sl, 3);
	if (pos != -1)
	{
		SLErase(&sl, pos);
	}
	pos = SLFind(&sl, 3);
	if (pos != -1)
	{
		SLErase(&sl, pos);
	}
	pos = SLFind(&sl, 3);
	if (pos != -1)
	{
		SLErase(&sl, pos);
	}
	pos = SLFind(&sl, 4);
	if (pos != -1)
	{
		SLErase(&sl, pos);
	}

	SLDestroy(&sl);
}

int main()
{
	test1();
	/*test2();*/
	/*test3();*/
	return 0;
}